import { observable, action, toJS, computed, autorun } from 'mobx';
import { ContainerLeastOne } from 'stores/models/core/nodeWithList';
import { Page } from 'modules';

/**
 * Pages
 */
export default class Pages extends ContainerLeastOne {
  icon = 'icon-page-list';
  originType = 'Pages';
  isRoot = true;
  @observable previewId = null;

  // 新建页面
  @action addPage(fromIndex = -1) {
    const page = new Page({ parent: this }); // notice
    this.insert(page, fromIndex);
  }
}
